# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Maintainer: Morten Linderud <foxboron@archlinux.org>

pkgname=conmon
pkgver=2.1.8
pkgrel=1
epoch=1
pkgdesc='OCI container runtime monitor'
arch=(loong64 x86_64)
url='https://github.com/containers/conmon'
license=(APACHE)
depends=(glibc glib2 systemd)
makedepends=(git)
_commit=00e08f4a9ca5420de733bf542b930ad58e1a7e7d	#refs/tags/v2.1.8
source=("git+https://github.com/containers/conmon#commit=${_commit}")
b2sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^v//;s/-/+/g'
}

build() {
  cd conmon
  make PREFIX=/usr LIBEXECDIR=/usr/lib DESTDIR="$pkgdir"
}

package() {
  install -Dm755 conmon/bin/conmon "$pkgdir/usr/bin/conmon"
}
